package com.winse.java.options.style;

/**
 * Object defining color and other style options for output.
 * 
 * @author Markus Gebhard
 */
public class JavaSourceStyleEntry {
	private RGB color;
	private boolean bold;
	private boolean italic;

	public JavaSourceStyleEntry(RGB color) {
		this(color, false, false);
	}

	public JavaSourceStyleEntry(RGB color, boolean bold, boolean italic) {
		this.color = color;
		this.italic = italic;
		this.bold = bold;
	}

	public boolean equals(Object obj) {
		if (!(obj instanceof JavaSourceStyleEntry)) {
			return false;
		}
		JavaSourceStyleEntry other = (JavaSourceStyleEntry) obj;
		return color.equals(other.color) && bold == other.bold && italic == other.italic;
	}

	public int hashCode() {
		return color.hashCode();
	}

	public RGB getColor() {
		return color;
	}

	public boolean isBold() {
		return bold;
	}

	public boolean isItalic() {
		return italic;
	}
}